<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // 函数表达式，不能再函数上面调用
    let fn = function (x, y) {
      console.log(x + y);

    }
    fn(1, 2)
    getSum(1, 2)
    //具名函数调用可以写在任何位置
    function getSum(x, y) {
      console.log(x + y);

    }

    // 立即执行函数
    (function (x, y) {
      console.log(x + y)
    })(1, 5)
  </script>
</body>

</html>